//I2C.h
#ifndef __I2C_H__
#define __I2C_H__

//#define SLAVE

//P47和P45都不要用
#ifdef SLAVE
sbit I2C_SCL = P4^6;
sbit I2C_SDA = P4^4;
#else
//MASTER
sbit I2C_SCL = P1^2;
sbit I2C_SDA = P1^4;
#endif




void I2C_Start(void);
void I2C_Stop(void);

void I2C_SendByte(unsigned char Byte);
unsigned char I2C_ReceiveByte(void);

void I2C_SendAck(bit AckBit);
bit I2C_ReceiveAck(void);

#endif